package com.sakhalin.news

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview

@Composable
fun CommentsPage() {
    val isLightTheme = MaterialTheme.colors.isLight

    Column(
        modifier = Modifier
            .fillMaxSize()
            .background(if (isLightTheme) Color.White else Color.Black)
            .wrapContentSize(Alignment.Center)) {
        Text(
            text = "Тут будут комментарии к новостям",
            fontWeight = FontWeight.Bold,
            color = if (isLightTheme) Color.Black else Color.White,
            modifier = Modifier.align(Alignment.CenterHorizontally)
        )
    }
}

@Preview(showBackground = true)
@Composable
fun CommentsPagePreview(){
    CommentsPage()
}